/**
 * Created by ltx on 2017/8/6.
 */
;$(function () {
    var backButton=$('.back-top');

    backButton.on('click',function () {
        $('html,body').animate({
            scrollTop:0
        },600)
    })
    $(window).on('scroll',function () {
        if ($(window).scrollTop() > $(window).height()){
            backButton.fadeIn();
        }
        else {
            backButton.fadeOut();
        }
    })
    $(window).trigger('scroll');
})
